import React from 'react';
import { Cascader, ConfigProvider } from 'antd';
import zhCN from 'antd/lib/locale/zh_CN';
import cn from 'classnames';
import s from './style.module.css';

const options = [
  {
    value: 'zhejiang',
    label: 'Zhejiang',
    children: [
      {
        value: 'hangzhou',
        label: 'Hangzhou',
        children: [
          {
            value: 'xihu',
            label: 'West Lake',
          },
        ],
      },
    ],
  },
  {
    value: 'jiangsu',
    label: 'Jiangsu',
    children: [
      {
        value: 'nanjing',
        label: 'Nanjing',
        children: [
          {
            value: 'zhonghuamen',
            label: 'Zhong Hua Men',
          },
        ],
      },
    ],
  },
];
const onChange = (value) => {
  console.log(value);
};
const component = ({ className, options, ...props }) => {
  return (
    <ConfigProvider locale={zhCN}>
      <Cascader className={cn(className,s.cas)} options={options} {...props} />
    </ConfigProvider>
  );
};

export default component;
